﻿package Map {
	import flash.display.MovieClip;
	
	public class Adjustable extends MovieClip {

		protected const points_per_block:uint = 20;
		
		public function Adjustable() {
			// constructor code
		}
		
		// update the position
		public function update() {
			x = adjust(x);
			y = adjust(y);
		}
		
		// use this to adjust the position if you used the Graphical Editor
		private function adjust(old:uint):uint {
			//trace(old : 
			return (Math.round(old/points_per_block) * points_per_block);
		}

	}
	
}
